import request from '@/utils/request'

// 查询订单商品列表
export function listItem(query) {
  return request({
    url: '/fun/item/list',
    method: 'get',
    params: query
  })
}

// 查询订单商品详细
export function getItem(orderItemId) {
  return request({
    url: '/fun/item/' + orderItemId,
    method: 'get'
  })
}

// 新增订单商品
export function addItem(data) {
  return request({
    url: '/fun/item',
    method: 'post',
    data: data
  })
}

// 修改订单商品
export function updateItem(data) {
  return request({
    url: '/fun/item',
    method: 'put',
    data: data
  })
}

// 删除订单商品
export function delItem(orderItemId) {
  return request({
    url: '/fun/item/' + orderItemId,
    method: 'delete'
  })
}
